using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using JGSY.CMS.LowCode.Platform.Domain.Entities;

namespace JGSY.CMS.LowCode.Platform.Domain.Interfaces
{
    /// <summary>
    /// 团队成员仓储接口
    /// </summary>
    public interface ITeamMemberRepository : IRepository<TeamMember>
    {
        /// <summary>
        /// 根据团队ID获取成员列表
        /// </summary>
        /// <param name="teamId">团队ID</param>
        /// <returns>团队成员列表</returns>
        Task<List<TeamMember>> GetByTeamIdAsync(long teamId);
        
        /// <summary>
        /// 根据用户ID获取团队成员列表
        /// </summary>
        /// <param name="userId">用户ID</param>
        /// <returns>团队成员列表</returns>
        Task<List<TeamMember>> GetByUserIdAsync(long userId);
        
        /// <summary>
        /// 检查用户是否为团队成员
        /// </summary>
        /// <param name="teamId">团队ID</param>
        /// <param name="userId">用户ID</param>
        /// <returns>是否为团队成员</returns>
        Task<bool> IsMemberAsync(long teamId, long userId);
        
        /// <summary>
        /// 获取团队成员角色
        /// </summary>
        /// <param name="teamId">团队ID</param>
        /// <param name="userId">用户ID</param>
        /// <returns>团队角色</returns>
        Task<string?> GetMemberRoleAsync(long teamId, long userId);
        
        /// <summary>
        /// 获取团队管理员列表
        /// </summary>
        /// <param name="teamId">团队ID</param>
        /// <returns>管理员列表</returns>
        Task<List<TeamMember>> GetTeamAdminsAsync(long teamId);
    }
}
